import * as types from '../../types/api';
import * as actionTypes from '../../types/action';

export interface HomepageState {
  newMultiList: types.NewMultiData[];
}

const initState: HomepageState = {
  newMultiList: [],
};

export default function Homepage (
  state: HomepageState = initState,
  action: actionTypes.HomepageNewMulti
        | actionTypes.HomepageXxx
) { // to fix
  switch (action.type) {
    case 'UPDATE_NEW_MULTI_LIST':
      state = {
        ...state,
        newMultiList: action.value,
      };
      break;
    // case 'xxx':
    //   state = {
    //     ...state,
    //     newMultiList: action.value,
    //   };
    //   break;

    default:
      break;
  }
  return state;
}
